import requests from "./request";
//教师界面api
let urlmethods={};
//获取教师密码信息
const gettchaccpwd=(name)=>{
    return requests.post('/gettchaccpwd',{username:name});
}
//教师修改密码
const edittchacc=(data)=>{
    return requests.post('/edittchacc',data);
}
//获取全部课程信息
const gettchcourse=(name)=>{
    return requests.get('/gettchcourse?username='+name);
}
//根据课程名称查询课程
const searchtchcourse=(data)=>{
    return requests.post('/searchtchcourse',data);
}
//教师开设课程
const coursecreate=(data)=>{
    return requests.post('/coursecreate',data);
}
//获取课程作业信息
const gethomeworkinfo=(name)=>{
    return requests.get('/gethomeworkinfo?username='+name);
}
//根据课程名称获取课程信息
const getcoursehwbyname=(data)=>{
    return requests.post('/getcoursehwbyname',data);
}
//获取具体作业情况
const gethwconcrete=(data)=>{
    return requests.post('/gethwconcrete',data);
}
//查询指定学生的作业提交情况
const searchhwbyname=(data)=>{
    return requests.post('/searchhwbyname',data);
}
//教师布置作业接口
const sethomework=(data)=>{
    return requests.post('/sethomework',data);
}
urlmethods.sethomework=sethomework;
urlmethods.searchhwbyname=searchhwbyname;
urlmethods.gethwconcrete=gethwconcrete;
urlmethods.getcoursehwbyname=getcoursehwbyname;
urlmethods.gethomeworkinfo=gethomeworkinfo;
urlmethods.coursecreate=coursecreate;
urlmethods.searchtchcourse=searchtchcourse;
urlmethods.gettchcourse=gettchcourse;
urlmethods.gettchaccpwd=gettchaccpwd;
urlmethods.edittchacc=edittchacc;
export default urlmethods;